
#available commands
reassembler:	fragment_reassembler
creator:	fragment_creator
all:		fragment_reassembler
clean:		cleanUpAll

#compiler and flags
comp:= g++ -O3

linkFlags:=
compileFlags:= 

#pathes
objDir:= objectfiles/
srcDir:= 

$(objDir):
	mkdir -p $(objDir)


# ====================================
#		fragment_creator
# ====================================


#vars for obj, src files
creatorFileList:= fragment_creator.cpp

creatorSrc:= $(addprefix $(srcDir),$(creatorFileList))
creatorObj:= $(addprefix $(objDir),$(creatorFileList:.cpp=.o))

#build command for executable
fragment_creator: $(objDir) $(creatorObj)
	$(comp) -o $@ $(creatorObj) $(linkFlags);


#commands for singel classes

$(objDir)fragment_creator.o: $(srcDir)fragment_creator.cpp
	$(comp) -o $@ -c $<



# ====================================
#		fragment_reassembler
# ====================================


#vars for obj, src files
reassemblerFileList:= fragment_reassembler.cpp

reassemblerSrc:= $(addprefix $(srcDir),$(reassemblerFileList))
reassemblerObj:= $(addprefix $(objDir),$(reassemblerFileList:.cpp=.o))

#build command for executable
fragment_reassembler: $(objDir) $(reassemblerObj)
	$(comp) -o $@ $(reassemblerObj) $(linkFlags);


#commands for singel classes

$(objDir)fragment_reassembler.o: $(srcDir)fragment_reassembler.cpp
	$(comp) -o $@ -c $<



# ====================================
#		clean up command
# ====================================

cleanUpAll:
	mkdir -p objectfiles
	rm -rf objectfiles